<template>
  <div class="order_apply">
    <header></header>
    <main>
      <div class="title">
        <span class="st">*</span> 选择用药人
        <div class="edit" v-if="sick.length">新增/编辑</div>
      </div>
      <div class="master">
        <div class="n" v-if="!sick.length">新建用药人</div>
      </div>
      <div class="title">
        <span class="st">*</span> 选择线下已确诊的病例<span>(至少选择一种疾病)</span>
      </div>
      <div class="illness">
        <div v-for="(item, index) in illnesses" :key="index">
          <span class="ills">
            <span class="illname">{{ item.name }}</span>
          </span>
        </div>
        <span class="ills add">
          <span class="illname">+</span>
        </span>
      </div>
    </main>
    <div class="addmsg">补充处方信息（选填）<span></span></div>
    <div class="imgmsg">
    <div class="title">处方/病例/检查报告<span>(至少选择一种疾病)</span></div>
    <div class="upimg">
        <van-uploader>
            <div class="van-uploader__wrapper"><div class="van-uploader__input-wrapper"><div class="upload_btn"><img class="gf3_disease_add_up_btn" src=""></div><input type="file" class="van-uploader__input" accept="image/*"></div></div>
</van-uploader>
    </div>
    </div>
    <van-sticky :offset-bottom="0" position="bottom">
  <div class="uploadmsg">

    </div>
</van-sticky>

    
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const sick = ref([])
const illnesses = ref([
  { id: 1, name: '短暂性脑缺血发作' },
  { id: 2, name: '糖尿病' },
  { id: 3, name: '充血性心力衰竭' },
  { id: 4, name: '心力衰竭' },
  { id: 5, name: '静脉血栓行程' },
  { id: 6, name: '高血压' },
  { id: 7, name: '头痛' },
  { id: 8, name: '发热' },
  { id: 9, name: '咽痛' },
  { id: 10, name: '肥胖症' },
])
const showadd=ref(false)
</script>

<style lang="scss" scoped>
.order_apply {
  width: 100%;
  background-color: #f0f0f0;
}
header {
  background-color: #fff;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
main {
  background-color: #fff;
  padding: 20px;
  margin: 20px;
  border-radius: 10px;
  .title {
    font-size: 30px;
    height: 30px;
    margin-bottom: 20px;
    line-height: 30px;
    background-color: #fff;
    display: flex;
    .edit {
      margin-left: 320px;
    }
    span {
      color: orangered;
      font-size: 27px;
    }
    .st {
      font-size: 35px;
      position: relative;
      top: 10px;
    }
  }
  .master {
    height: 200px;
    border-bottom: #f0f0f0 solid 1px;
    .n {
      width: 200px;
      height: 70px;
      background: #ff6251;
      line-height: 70px;
      text-align: center;
      font-size: 25px;
      color: #fff;
      margin: auto;
      border-radius: 50px;
      position: relative;
      top: 50px;
    }
  }
  .illness {
    margin-top: 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    .ills {
      display: block;
      border: 1px solid #ddd;
      margin: 0.2rem 0 0 0.2rem !important;
      border-radius: 15px;
      padding-top: 15px;
      padding-bottom: 15px;

      .illname {
        font-size: 30px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        height: 0.72rem;
        line-height: 0.72rem;
        margin-left: 25px;
        margin-right: 25px;
      }
    }
    .add {
      padding-left: 15px;
      padding-right: 15px;
      .illname {
        font-weight: 800;
        color: #ddd;
      }
    }
  }
}
.addmsg {
  width: 100%;
  text-align: center;
  color: #999;
  span {
    width: 12px;
    height: 12px;
    background: url()
      no-repeat 50%;
    background-size: 100% 100%;
    display: inline-block;
  }
}
.imgmsg{
   padding: 20px;
  margin: 20px;
  border-radius: 10px;
background-color: #fff;
margin-top: 50px;
}
.title {
  font-size: 30px;
  height: 30px;
  line-height: 30px;
  margin-bottom: 20px;
  display: flex;
  margin-top: 30px;
  
}
.upimg{
  margin-top: 40px;
}
.upload_btn{
    width: 120px;
    height: 120px;
    border-radius: .16rem;
    border: 1px solid #ddd;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
}
.uploadmsg{
  height: 200px;
}
</style>
